#include <iostream>
using std::cout;
using std::endl;

int num = 100;

namespace wd
{
int num = 10;

void print(){
    cout << "wd::print()" << endl;
}
}//end of namespace wd

namespace cpp
{
int num = 20;
}//end of namespace cpp


void test0(){
    //using声明语句建议写到局部作用域
    //using声明的实体会对全局的同名内容起到屏蔽作用
    using wd::num;
    using wd::print;//只写函数名
    cout << num << endl;
    print();
}

void test1(){
    using cpp::num;
    cout << num << endl;
}

int main(void){
    test0();
    test1();
    return 0;
}
